package org.jeecg.controller;

import org.jeecg.domain.dto.HistoryOrdersDto;
import org.jeecg.service.HistoryOrdersServeSyncService;
import org.jeecg.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/historyOrders")
public class HistoryOrdersServeSyncController {
    @Autowired
    private HistoryOrdersServeSyncService historyOrdersServeSyncService;
//    查询所有根据状态（分页）
    @GetMapping("/findPage")
    public ResponseResult findPage(HistoryOrdersDto dto){
        return historyOrdersServeSyncService.findPage(dto);
    }
//    详情
    @GetMapping("/getOneById")
    public ResponseResult getOneById(@RequestParam("id") String id){
        return historyOrdersServeSyncService.getOneById(id);
    }
}
